﻿<%@ Page Title="" Language="C#" EnableEventValidation="false" MasterPageFile="~/DMaster.master"
    AutoEventWireup="true" CodeFile="OurLibrary.aspx.cs" Inherits="OurLibrary"meta:resourcekey="PageResource1"%>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/MARCDetails.ascx" TagName="MARCDetails" TagPrefix="MD" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<title>المجلات والصحف</title>
    <link href="jqModal.css" rel="stylesheet" type="text/css" />

    <script src="jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="jqModal.js" type="text/javascript"></script>
    <link type="text/css" href="jquery.jscrollpane.css" rel="stylesheet" media="all" />

<!-- latest jQuery direct from google's CDN -->

<!-- the mousewheel plugin - optional to provide mousewheel support -->
<script type="text/javascript" src="jquery.mousewheel.js"></script>

<!-- the jScrollPane script -->
<script type="text/javascript" src="jquery.jscrollpane.min.js"></script>

    <script type="text/javascript">
       
        function there2() {

            $("#dialog2").jqm({ modal: true }).jqmShow();


        }


        $(function() {
            $('.scroll-pane').jScrollPane();
        });

        
       
    </script>

    <style type="text/css">
        .zr3 {
	background-image:url('images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
}
.he3{
	background-color:#fff;
	padding:5px;
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
}
        .jqmWindow
        {
            display:none;
            position: fixed;
            top: 5%;
            left: 35%;
            margin-left: -250px;
            width: 900px;
            background-color: #fff;
            color: #333;
            border: 1px solid black;
            padding: 12px;
        }
        .scroll-pane{width:100%;height:400px;overflow:auto;}
        
        .horizontal-only{height:auto;max-height:400px;}
       
        .jqmOverlay
        {
            background-color: #000;
        }
        /* Fixed posistioning emulation for IE6
     Star selector used to hide definition from browsers other than IE6
     For valid CSS, use a conditional include instead */
        * html .jqmWindow
        {
            position: absolute;
            top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
        }
        
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
   
  
                
    
    <div dir="rtl"  >
        <asp:UpdatePanel ID="up1" runat="server" ChildrenAsTriggers="true">
            <ContentTemplate>
            <table width="100%" style="padding:10px;" dir="rtl">
<tr>
   
<td style="padding:5px; width:130px;" >

    

    <asp:Label ID="Label4" CssClass="stylelabel3" runat="server" Text="كلمة البحث" meta:resourcekey ="Searchkey"></asp:Label>

    

</td>
<td style="padding:5px; width:200px;">
    <asp:TextBox ID="searchfield" runat="server" CausesValidation="True" 
        style="border:1px solid black" AutoPostBack="true" 
        ontextchanged="searchfield_TextChanged" Width="150px"></asp:TextBox>

    <asp:AutoCompleteExtender ID="To_AutoCompleteExtender" runat="server" 
        ContextKey="product" Enabled="True" MinimumPrefixLength="3" 
        ServiceMethod="GetACTList" ServicePath="~/SelectMail.asmx" 
        TargetControlID="searchfield" UseContextKey="true">
    </asp:AutoCompleteExtender>

</td>
<td >

    
    
</td>
<%--<td>
<a href="#" id="lblasearch" onclick="there();" >بحث متقدم</a>
</td>--%>

</tr>
<tr>
<td style="padding:5px; width:130px;">
    <asp:Label ID="Label5" CssClass="stylelabel3" runat="server" Text="موضع البحث" meta:resourcekey="Searchtype"></asp:Label>
    </td>
<td style="padding:5px; width:200px;"> 
    <asp:DropDownList ID="DropDownList4" runat="server"
        style="border:1px solid black; " Width="150px">
        <asp:ListItem Selected="True" Value="0" meta:resourceKey="lblall">الكل</asp:ListItem>
        <asp:ListItem Value="product" meta:resourceKey="lblendofsubs">اسم الجهة</asp:ListItem>
        <asp:ListItem Value="auther1" meta:resourceKey="lblstartofsubs">العنوان</asp:ListItem>
        <asp:ListItem Value="productdesc" meta:resourceKey="lblstop">اسم الشركة</asp:ListItem>
    </asp:DropDownList>
    </td>
<td>
    <asp:Button ID="Button2" runat="server" CssClass="zr3" 
        onclick="ImageButton1_Click" Text="إبحث" meta:resourcekey="searchButton"/>
    
    </td>
</tr>
<tr>

<td colspan="3">
    <asp:Label ID="Label1" runat="server" ForeColor="#FF3300" 
        Text="<%$ Resources:Resource, searchresult %>" Visible="False"></asp:Label>
    
    
    
    </td>
</tr>
</table>
            

<br />
             <table class="tab3" >
             <tr class="he3">
             <td colspan ="2" align ="right">
                 <asp:Label ID="lblfilter" runat="server"  
                     meta:resourceKey="lblfilter" Text="فلترة المنتجات" />
             </td>
             
             </tr>
             <tr>
             <td class="tabbone3">
                 <asp:Label ID="lblttype" runat="server"  
                     meta:resourceKey="lbltype" Text="النوع" />
             </td>
             <td class="tabbone3">
                 <asp:Label ID="lblstatus" runat="server"  
                     meta:resourceKey="lblstatus" Text="التصنيف" />
             </td>
             </tr>
             <tr>
             <td class="adel3">
                 <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                     ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                     SelectCommand="SELECT product_type+',('+tag+')' as names, [id] ,[product_type] FROM [product_types]">
                 </asp:SqlDataSource>
                 <asp:DropDownList ID="act" runat="server" AutoPostBack="true" 
                     DataSourceID="SqlDataSource2" DataTextField="product_type" DataValueField="id" 
                     onselectedindexchanged="act_SelectedIndexChanged" 
                     style="border:1px solid black">
                 </asp:DropDownList>
             </td>
             <td class="adel3">
                 <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                     ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                     SelectCommand="SELECT [id], [classification] FROM [classifications]">
                 </asp:SqlDataSource>
                 <asp:DropDownList ID="allcompanies" runat="server" AutoPostBack="true" 
                     DataSourceID="SqlDataSource4" DataTextField="classification" 
                     DataValueField="id" onselectedindexchanged="allcompanies_SelectedIndexChanged" 
                     style="border:1px solid black">
                 </asp:DropDownList>
                 </td>
             </tr>
             </table>
             <br />

                <asp:ListView ID="ListView1" runat="server" DataKeyNames="id" 
                    DataSourceID="SqlDataSource1" OnItemCommand="Listview1_ItemCommand">
                    <ItemTemplate>
                        <table class="tab3" 
                            style="margin-bottom:5px;background-color:#ededed">
                            <tr>
                                <td colspan="2">
                                    <table class="tab3" style="width:810px;margin-top:3px; background-color:#028ac5;color:#fff">
                                        <tr>
                                            <td style="width:700px">
                                                <asp:Label ID="Label11" runat="server" 
                                                    Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("product"))) %>' />
                                            </td>
                                            <td style="width:100px">
                                                <asp:Label ID="Label12" runat="server" 
                                                    Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("product_type"))) %>' />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td style="width:100px">
                                    <asp:Label ID="lblstops" runat="server" meta:resourceKey="lblstop" 
                                        Text="الوصف" />
                                </td>
                                <td style="width:700px">
                                    <asp:Label style="float:right" ID="Label10" runat="server" 
                                        Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("productdesc"))) %>' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblstartofsubs" runat="server" meta:resourceKey="lblstartofsubs" 
                                        Text="المؤلف" />
                                </td>
                                <td>
                                    <asp:Label ID="startofsub" runat="server" 
                                        Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("auther1"))) %>' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblpaidfees" runat="server" meta:resourceKey="lblpaidfees" 
                                        Text="النشر والتوزيع" />
                                </td>
                                <td>
                                    <asp:Label ID="paidfees" runat="server" 
                                        Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("publisher"))) %>' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblissn" runat="server" meta:resourceKey="lblissn" 
                                        Text="الرقم التعريفى" />
                                </td>
                                <td>
                                    <asp:Label ID="Label13" runat="server" 
                                        Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("issn"))) %>' />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label7" runat="server" meta:resourceKey="lbltype" Text="النوع" />
                                </td>
                                <td>
                                    <asp:Label ID="Label15" runat="server" 
                                        Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("topic"))) %>' />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <table style="width:100%">
                                        <tr>
                                            <td >
                                                <asp:LinkButton ID="LinkButton1" runat="server" 
                                                    CommandArgument='<%# Bind("id") %>' CommandName="show" 
                                                    meta:resourceKey="lblshow">عرض  </asp:LinkButton>
                                            </td>
                                            
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <EmptyDataTemplate>
                      <table><tr><td class="he3" style="padding-right:10px;">لايوجد نتائج بحث</td></tr></table>                     </EmptyDataTemplate>
                    <LayoutTemplate>
                        <ul ID="itemPlaceholderContainer" runat="server" style="">
                            <li ID="itemPlaceholder" runat="server" />
                            </ul>
                            <div align="center" style="">
                                <asp:DataPager ID="DataPager1" runat="server" PageSize="4">
                                    <Fields>
                                        <asp:NextPreviousPagerField ButtonType="Link" FirstPageText="" LastPageText="" 
                                            NextPageText="" PreviousPageText="" ShowFirstPageButton="True" 
                                            ShowNextPageButton="false" ShowPreviousPageButton="false"  />
                                        <asp:NumericPagerField />
                                    </Fields>
                                </asp:DataPager>
                            </div>
                        </LayoutTemplate>
                    </asp:ListView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="select p.*,t.product_type from  products p Left JOIN product_types t ON (t.id = p.product_type_id) Order BY p.id desc">
                </asp:SqlDataSource>
               
                <div class="jqmWindow" id="dialog2" style="max-height:80%;overflow:auto">
                    <a href="#" class="jqmClose" style="background-image:url('images/close.png');
	 width:39px;
	 height:40px;
	  background-repeat:no-repeat;
	  display:block;
	  float:left;	"></a>
                 
                    <div >
                    
                    <%--<asp:Panel ID="Panel2" runat="server" Wrap="true" BackColor="#CCCCCC">
                   --%>     <MD:MARCDetails ID="MARCDetails1" runat="server" />
                   <%-- </asp:Panel>--%>
                   </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        

    </div>

    
   

    
</asp:Content>
